<?php /*a:2:{s:89:"F:\xiaopi\phpstudy_pro\WWW\22php\cmf6\public/themes/admin_simpleboot3/zwt\goods\edit.html";i:1718175727;s:88:"F:\xiaopi\phpstudy_pro\WWW\22php\cmf6\public/themes/admin_simpleboot3/public\header.html";i:1690974980;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->


    <link href="/themes/admin_simpleboot3/public/assets/themes/<?php echo cmf_get_admin_style(); ?>/bootstrap.min.css" rel="stylesheet">
    <link href="/themes/admin_simpleboot3/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        form .input-order {
            margin-bottom: 0px;
            padding: 0 2px;
            width: 42px;
            font-size: 12px;
        }

        form .input-order:focus {
            outline: none;
        }

        .table-actions {
            margin-top: 5px;
            margin-bottom: 5px;
            padding: 0px;
        }

        .table-list {
            margin-bottom: 0px;
        }

        .form-required {
            color: red;
        }

        .td-actions .btn {
            margin-bottom: 2px;
            min-width: 96px;
            text-align: center;
        }

        .td-actions .btn:last-child {
            margin-bottom: 0;
        }
        a:hover, a:focus{
            text-decoration: none;
        }
    </style>
    <?php 
		$is_mobile=cmf_is_mobile();
        $_static_version='1.0.4';
        $cmf_version=cmf_version();
        if (strpos(cmf_version(), '6.') === 0) {
            $_app=app()->http->getName();
        }else{
            $_app=request()->module();
        }
     ?>
    <script type="text/javascript">
        //全局变量
        var GV = {
            ROOT: "/",
            WEB_ROOT: "/",
            JS_ROOT: "static/js/",
            APP: '<?php echo $_app; ?>'/*当前应用名*/,
            IS_MOBILE: <?php echo !empty($is_mobile) ? 'true'  :  'false'; ?>
        };
    </script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-1.12.4.min.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-migrate-1.4.1.min.js"></script>
<!--    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-3.6.0.min.js"></script>-->
    <script src="/static/js/wind.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/bootstrap.min.js"></script>
    <script>
        Wind.css('artDialog');
        Wind.css('layer');
        $(function () {
            $("[data-toggle='tooltip']").tooltip({
                container: 'body',
                html: true,
            });
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });
    </script>
    <?php if(APP_DEBUG): ?>
        <style>
            #think_page_trace_open {
                z-index: 9999;
            }
        </style>
    <?php endif; ?>

</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="<?php echo url('Goods/index'); ?>">商品列表</a></li>
        <li ><a href="<?php echo url('Goods/add'); ?>">添加商品</a></li>
        <li class="active"><a href="<?php echo url('Goods/edit'); ?>">编辑商品</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="<?php echo url('Goods/addPost'); ?>">

        <div class="form-group">
            <label for="input-image" class="col-sm-2 control-label">轮播图<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input id="photo-1" type="hidden" name="image" value="<?php echo $list['image']; ?>">
                <input id="photo-1-name" type="text" name="image" value="<?php echo $list['image']; ?>" title="图片名称" class="form-control" readonly disabled>
            </div>
        </div>
        <div class="form-group">
            <label for="input-image" class="col-sm-2 control-label"></label>
            <div class="col-md-6 col-sm-10">
                <img id="photo-1-preview" style="width: 100px;" src="<?php echo $list['image']; ?>">
                <div>
                    <a href="javascript:uploadOneImage('图片上传','#photo-1');" class="btn btn-primary">上传</a>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="booklet" class="col-sm-2 control-label"><span class="form-required">*</span>图册</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="source" name="source" value="<?php echo $list['source']; ?>">
                <ul id="photos" class="pic-list unstyled"></ul>
                <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-wrapper');" class="btn btn-small">选择图片</a>
            </div>
        </div>
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">商品名称</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="name" name="name" value="<?php echo $list['name']; ?>">
            </div>
        </div>
        <div class="form-group">
            <label for="title" class="col-sm-2 control-label">商品标题</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="title" name="title" value="<?php echo $list['title']; ?>">
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">自营状态</label>
            <div class="col-md-6 col-sm-10">
                <label class="radio-inline">
                    <input type="radio" name="zy" value="1" checked> 是
                </label>
                <label class="radio-inline">
                    <input type="radio" name="zy" value="0"> 否
                </label>
            </div>
        </div>
        <div class="form-group">
            <label for="yf" class="col-sm-2 control-label">运费</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="yf" name="yf" value="<?php echo $list['yf']; ?>">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">商品状态</label>
            <div class="col-md-6 col-sm-10">
                <label class="radio-inline">
                    <input type="radio" name="status" value="1" checked> 正常
                </label>
                <label class="radio-inline">
                    <input type="radio" name="status" value="2"> 下架
                </label>
                <label class="radio-inline">
                    <input type="radio" name="status" value="0"> 无货
                </label>
            </div>
        </div>
        <div class="form-group">
            <label for="input-url" class="col-sm-2 control-label">跳转链接</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-url" name="url" value="<?php echo $list['url']; ?>">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">添加</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">取消</a>
            </div>
        </div>
    </form>
</div>
<script src="/static/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="/static/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/static/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var editorcontent = new baidu.editor.ui.Editor();
    editorcontent.render('content');
</script>
<script type="text/html" id="photos-item-wrapper">
    <li id="savedimage{id}">
        <input id="photo-{id}" type="hidden" name="photos[]" value="{filepath}">
        <input id="photo-{id}-name" type="text"  value="{name}" style="width: 160px;" title="图片名称">
        <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;" onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:upload_one_image('图片上传','#photo-{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage{id}').remove();})();">移除</a>
    </li>
</script>
</body>
</html>